#include <bits/stdc++.h>

using namespace std;

class Solution
{
public:
    char findTheDifference(string s, string t)
    {
        int hash1[26] = {0};
        int hash2[26] = {0};
        for (auto e : s)
        {
            ++hash1[e - 'a'];
        }
        for (auto e : t)
        {
            ++hash2[e - 'a'];
        }
        for (int i = 0; i < 26; ++i)
        {
            if (hash1[i] != hash2[i])
            {
                return 'a' + i;
            }
        }
        return 0;
    }
};